package com.kjtpay.design_pattern.chain;

/**
 * 总经理；ConcreteHandler；终极处理类，不转发请求
 */
class GeneralManager extends Manager {
    public GeneralManager(String name) {
        super(name);
    }

    @Override
    public void requestApplication(Request request) {
        if ("请假" == request.type) {
            log = name + ":" + request.content + ",数量："
                    + request.number + " === 被批准" + "\n";
        }
        else if (("加薪" == request.type) && (request.number <= 500)) {
            log = name + ":" + request.content + ",数量："
                    + request.number + " === 被批准" + "\n";
        } else {
            log = name + ":" + request.content + ",数量："
                    + request.number + " === 再说吧" + "\n";
            // 这是最后处理的地方，没有下一级
        }
    }
}
